FROM bitnami/nginx:1.23-debian-11

ARG API_PROXY
ENV API_PROXY ${API_PROXY}
#ENV API_PROXY
COPY config/nginx.conf /etc/nginx/nginx.conf
COPY /dist /usr/share/nginx/html

RUN sudo sed -i 's/${proxy_pass}/'"$API_PROXY"'/g' /etc/nginx/nginx.conf

EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]
